<!doctype html>
<html lang="zh">
<head>
	<meta charset="utf-8" />
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<title><?php echo $holidayData['sub_name'];?>：<?php echo $holidayData['name'];?></title>
	<meta name="keywords" content="打折酒店,打折宾馆,广州周边游" />
    <meta name="description" content="唯品会旅游折扣频道提供北京、上海、广州等一二线城市打折酒店、打折宾馆信息以及广州周边旅游团购信息和丽江、三亚等著点景点旅游团购信息，欢迎致电400-6789-888" />
    <link href="<?php echo $view['staticCss']; ?>/tour/<?php echo $view['cssMainVer']; ?>/comm.css?<?php echo $view['cssVer']; ?>" rel="stylesheet" type="text/css" />
	<link href="<?php echo $view['staticCss']; ?>/tour/<?php echo $view['cssMainVer']; ?>/tour.css?<?php echo $view['cssVer']; ?>" rel="stylesheet" type="text/css" />
	
	<!-- 只允许引入两个js文件 -->
	<script src="<?php echo $view['staticJs']; ?>/jquery.js?<?php echo $view['jsVer']; ?>" type="text/javascript"></script>
	<script src="<?php echo $view['staticJs']; ?>/core.js?<?php echo $view['jsVer']; ?>" type="text/javascript"></script>
    
 	<link rel="Shortcut Icon" href="/favicon.ico" type="image/x-icon" />
</head>

<body>
<?php include($view['basePath'].'/header.html');?>

<div class="tour_detail base_width mgc clearfix">
	
    <a href="/holiday-list.html" class="back_list shadow detail_sprite">
    	<span class="fr">返<br>回<br>列<br>表</span>
    </a>
	<div class="detail_main base_width clearfix">
  <div class="detail_pic fl shadow">
        	<div class="title">
            	<b><?php echo $holidayData['name']; ?></b>
                <div class="s_title">
                	<em class="st_title fl"><?php echo $holidayData['sub_name']; ?></em><span title="酒店" class="<?php echo ($holidayData['product_include']['hotel'] ? 'hover' : ''); ?> s1 list_sprite clearfont fl"></span><span title="餐厅" class="<?php echo ($holidayData['product_include']['restaurant'] ? 'hover' : ''); ?> s2 list_sprite clearfont fl"></span><span title="景区门票" class="<?php echo ($holidayData['product_include']['scenic'] ? 'hover' : ''); ?> s3 list_sprite clearfont fl"></span><span title="机票" class="<?php echo ($holidayData['product_include']['airplane'] ? 'hover' : ''); ?> s4 list_sprite clearfont fl"></span>
                    <div class="time fr">
                        	<div class="time_icon list_sprite clearfont fl"></div>
                            <div class="time_text fl J_countdown"></div>
                    </div>
                </div>
            </div>
            <div class="pic_show" id="J_img_slider">
            	<div class="big_small J_slides_container"></div>
              	<div class="pic_small J_nav_container">
                    <div class="content J_img_list">
                    	<ul class="J_small_list">
                      <?php foreach($photoData as $img){ ?>
                        	<li>
                        		<a href="<?php echo $img['photo_path'];?>">
	                        		<img src="<?php echo $img['photo_path'];?>" title="<?php echo $img['title'];?>" width="105" height="56">
									<span class="black clearfont"></span>
									<span class="top_angle detail_sprite clearfont"></span>
								</a>
							</li>
					  <?php } ?>
                        </ul> 
                    </div>
                </div>
            </div>
        </div>
        <div class="shadow fr">
        	<div class="detail_order">
        		<a name="J_goto_pay"></a>
        		<form id="J_order_form" method="post" action="<?php echo $view['apiHost']; ?>/tour/tour_orders.php?act=add">
            	<div class="contrast detail_bg_sprite">
                	<div class="down_price fl">
                    <p>套餐低至：</p>
                    <b>&yen;<?php echo $holidayData['sell_price'];?></b>
                    </div>
                	<div class="contrast fr">
					节省：&yen;<?php echo($holidayData['market_price']-$holidayData['sell_price']);?><br>
                    原价：&yen;<?php echo $holidayData['market_price'];?>
                    </div>
                </div>
            	<div class="calendar">
                	<div class="title">选择出发日期</div>
                    <div class="content" id="J_datePicker_box"></div>
                </div>
                <div class="p_num">
                	<div class="title">选择出发人数并预订</div>
                	<div class="content">
                    	<div class="people fl">
                        	<label>套餐：</label><select id="J_people_num" name="nums"><option value="0"> 0 </option></select>
                        </div>
                        
						<input type="hidden" id="J_product_id" name="id" value="<?php echo $holidayData['id']; ?>">
						<input type="hidden" id="J_start_time" name="start_time" value="">
                    </div>
                </div>
                <a id="J_order_submit" class="submit_icon detail_sprite">
                	<b id="J_total_price"></b>
                    <p id="J_save_money"></p>
                </a>
				</form>
            </div>
        </div>
    </div>
    <div class="shadow base_width mgc">
        <div class="detail_content">
            <div class="title detail_bg_sprite">
                <div class="icon detail_sprite fl clearfont"></div>
                <div class="text fl"><?php echo $holidayData['name'];?></div>
            </div>
            <div class="content"><?php echo $holidayData['product_detail']; ?></div>
        </div>
    </div>
    <div class="shadow base_width mgc">
    	<div class="detail_price">
        	<div class="text fl">
            	<b>&yen;<?php echo $holidayData['sell_price'];?></b><em>/</em>人起
            </div>
        	<a href="#J_goto_pay" class="icon detail_sprite clearfont fr" title="回到顶部，选择日期、人数预订"></a>
        </div>
    </div>
</div>

<script type="text/javascript">
	var countDown = <?php if(!empty($holidayData['sell_end'])){echo $holidayData['sell_end'];}else{echo '""';}?>;
	
	<?php $dayStock = array();
		  $dayPrice = array();
			  foreach ($stockData as $stockInfo){
			  	  $dayStock[$stockInfo['stock_date']] = $stockInfo['stock'];
				  $dayPrice[$stockInfo['stock_date']] = $stockInfo['sell_price'];
			  } ?>
	  
	var dayStock = <?php if ($dayStock){echo json_encode($dayStock);}else {echo '""';} ?>;
	var dayPrice = <?php if ($dayPrice){echo json_encode($dayPrice);}else {echo '""';} ?>;
	var holidayData = {
		capacitance : <?php if ($holidayData['capacitance']){echo $holidayData['capacitance'];}else {echo '0';} ?>,
		sell_price : <?php echo $holidayData['sell_price'];?>,
		market_price : <?php echo $holidayData['market_price'];?>
	}; 

	var O_submit = {
        id : <?php echo $query['productId']; ?>,
        nums : <?php echo $query['b_n']; ?>,
        rooms : <?php echo $query['b_r']; ?>,
        start_time : <?php echo $query['b_t']; ?>
    };

	var inf_omniture = ['旅游频道终端页', <?php echo date('Ymd', $_SERVER['REQUEST_TIME']) == date('Ymd', $holidayData['sell_start']) ? 1 : 0; ?>, <?php $holidayData['product_type']; ?>, <?php echo $holidayData['id']; ?>];
	
	$.Loader
		.advScript( {
			name : 'datePicker',
			url : '<?php echo $view['staticJs']; ?>/plugins/jquery.datePicker.js?<?php echo $view['jsVer']; ?>'
		},{
			name : 'gallery',
			url : '<?php echo $view['staticJs']; ?>/plugins/jquery.ad-gallery.js?<?php echo $view['jsVer']; ?>'
		},{
			name : 'tour-detail',
			url : '<?php echo $view['staticJs']; ?>/tour/<?php echo $view['jsMainVer']; ?>/holiday-detail.js?<?php echo $view['jsVer']; ?>',
			requires : ['datePicker', 'gallery']
		},{
			name : 'tour-head',
			url : '<?php echo $view['staticJs']; ?>/tour/<?php echo $view['jsMainVer']; ?>/header.js?<?php echo $view['jsVer']; ?>'
		}, {
			name : 'lazyload',
			url : '<?php echo $view['staticJs']; ?>/plugins/lazyload.js?<?php echo $view['jsVer']; ?>'
		}, {
			name : 'load-after',
			def : function () {$("img.lazy").lazyload({ threshold : 200 });},
			requires : ['lazyload']
		}, {
			name : 'inf',
			url : '<?php echo $view['staticJs']; ?>/tour/<?php echo $view['jsMainVer']; ?>/inf.js?<?php echo $view['jsVer']; ?>'
		}, {
			name : 'inf-2',
			def : function () { 
				$(window).load(function () {
					comm();
					detail();
				});
			},
			requires : ['inf']
	} );
</script>

<?php include($view['basePath'].'/footer.html');?>
</body>
</html>
